﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

namespace Jy123.Web.Manage.User
{
    public partial class VoteMng : MgConfig//.Web.UI.Page
    {
        protected int pagesize = 10;
        protected int cpage = 1;//当前页
        protected List<int?> count;
        protected void Page_Load(object sender, EventArgs e)
        {
            Verify("VoteMng.aspx");
            if (Request.QueryString["page"] != null)
            {
                cpage = Convert.ToInt32(Request.QueryString["page"]);
            }
            count = new List<int?>();
            string type = Request.QueryString["Type"];
            if (type == "del")
            {
                new BLL.User_Vote().Delete(Convert.ToInt32(Request.QueryString["id"]));
            }
            BindRpt();
        }
        private void BindRpt()
        {

            RptData.DataSource = new BLL.User.Vote().VoteList(txtName.Text,txtTitle.Text, cpage, pagesize, "*", "AddTime DESC",out count);
            RptData.DataBind();
        }


    }
}
